-
-
Notifications
You must be signed in to change notification settings - Fork 589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Desktop Switch Triggers for different animations #1262
Conversation
Signed-off-by: Yuxuan Shui <[email protected]>
Signed-off-by: Yuxuan Shui <[email protected]>
Allow the definition of customizable animations using expressions and transition curves. Signed-off-by: Yuxuan Shui <[email protected]>
Signed-off-by: Yuxuan Shui <[email protected]>
Signed-off-by: Yuxuan Shui <[email protected]>
We should always process all the X events in libxcb's queue with the server grabbed, not just when we have `pending_updates` flag set. This is the only way to make sure we always render with up-to-date server states. Signed-off-by: Yuxuan Shui <[email protected]>
Remove the old fading machinary. As a side-effect, animation and time based shaders are now unified. Signed-off-by: Yuxuan Shui <[email protected]>
Signed-off-by: Yuxuan Shui <[email protected]>
Signed-off-by: Yuxuan Shui <[email protected]>
Signed-off-by: Yuxuan Shui <[email protected]>
Signed-off-by: Yuxuan Shui <[email protected]>
Signed-off-by: Yuxuan Shui <[email protected]>
Signed-off-by: Yuxuan Shui <[email protected]>
Signed-off-by: Yuxuan Shui <[email protected]>
An attempt to make rendering with damage deterministic even when replayed from a trace. Signed-off-by: Yuxuan Shui <[email protected]>
Signed-off-by: Yuxuan Shui <[email protected]>
Signed-off-by: Yuxuan Shui <[email protected]>
Signed-off-by: Yuxuan Shui <[email protected]>
Signed-off-by: Yuxuan Shui <[email protected]>
Signed-off-by: Yuxuan Shui <[email protected]>
This can be used to prevent another animation from interrupting the current running animation. Signed-off-by: Yuxuan Shui <[email protected]>
This adds support for desktop switching animations by keeping track of _NET_CURRENT_DESKTOP atom on the root window. As far as I understand this atom is set by window managers and so if it changes we can know that it's a desktop switch happening. Unfortunately window manager may need to set this BEFORE hiding/showing windows so we can animate correctly, me personally using FluxBox and this quick change pijulius/fluxbox@83ee4db makes it work just fine. It adds the following animation triggers: * workspace-out * workspace-out-inverse * workspace-in * workspace-in-inverse Unfortunately had to add inverse variables too as you may navigate to the next workspace from for e.g. 1st to 2nd but you may also go to 2nd from 1st and in that case the animations have to be totally different. Here is a config example for switching workspace: animations = ({ triggers = ["workspace-out"]; offset-y = { timing = "0.2s cubic-bezier(0.21, 0.02, 0.76, 0.36)"; start = "0"; end = "-window-height"; }; shadow-offset-y = "offset-y"; opacity = { timing = "0.2s linear"; start = "window-raw-opacity-before"; end = "window-raw-opacity"; }; blur-opacity = "opacity"; shadow-opacity = "opacity"; }, { triggers = ["workspace-out-inverse"]; offset-y = { timing = "0.2s cubic-bezier(0.21, 0.02, 0.76, 0.36)"; start = "0"; end = "window-height + window-y"; }; shadow-offset-y = "offset-y"; opacity = { timing = "0.2s linear"; start = "window-raw-opacity-before"; end = "window-raw-opacity"; }; blur-opacity = "opacity"; shadow-opacity = "opacity"; }, { triggers = ["workspace-in"]; offset-y = { timing = "0.2s cubic-bezier(0.24, 0.64, 0.79, 0.98)"; start = "window-height + window-y"; end = "0"; }; shadow-offset-y = "offset-y"; opacity = { timing = "0.2s linear"; start = "0"; end = "window-raw-opacity"; }; blur-opacity = "opacity"; shadow-opacity = "opacity"; }, { triggers = ["workspace-in-inverse"]; offset-y = { timing = "0.2s cubic-bezier(0.24, 0.64, 0.79, 0.98)"; start = "-window-height"; end = "0"; }; shadow-offset-y = "offset-y"; opacity = { timing = "0.2s linear"; start = "0"; end = "window-raw-opacity"; }; blur-opacity = "opacity"; shadow-opacity = "opacity"; })
Yeah, that's the problem I was thinking when I said this is impossible. Because the order of changes is not defined by any specification. So unless we can somehow convince all window managers to change, I don't think we can rely on this. If we do what we get will be endless streams of bug reports from people using a window manager that behaves differently... And beyond that, your implementation also requires that the |
Yep, got it, nw, thanks for the inputs! Unfortunately atm don't know any other way to implement this, it worked out just fine for myself in the last years so will keep it and let it here till there is a better solution. |
My plan is to add a dbus interface and custom animation triggers. so you can, for example, run a |
Hmm, that sounds great, so could use dbus to sign picom that workspace switching is happening, just not sure if the dbus event is picked up sooner than the windows start to hide/show but do like the idea a lot! |
Define script context variables describing the monitor a window is on. Signed-off-by: Yuxuan Shui <[email protected]>
This adds support for desktop switching animations by keeping track of _NET_CURRENT_DESKTOP atom on the root window.
As far as I understand this atom is set by window managers and so if it changes we can know that it's a desktop switch happening. Unfortunately window manager may need to set this BEFORE hiding/showing windows so we can animate correctly, me personally using FluxBox and this quick change pijulius/fluxbox@83ee4db makes it work just fine.
It adds the following animation triggers:
Unfortunately had to add inverse variables too as you may navigate to the next workspace from for e.g. 1st to 2nd but you may also go to 2nd from 1st and in that case the animations have to be totally different.
Here is a config example for switching workspace:
animations = ({
triggers = ["workspace-out"];
offset-y = {
timing = "0.2s cubic-bezier(0.21, 0.02, 0.76, 0.36)";
start = "0";
end = "-window-height";
};
shadow-offset-y = "offset-y";
opacity = {
timing = "0.2s linear";
start = "window-raw-opacity-before";
end = "window-raw-opacity";
};
blur-opacity = "opacity";
shadow-opacity = "opacity";
},
{
triggers = ["workspace-out-inverse"];
offset-y = {
timing = "0.2s cubic-bezier(0.21, 0.02, 0.76, 0.36)";
start = "0";
end = "window-height + window-y";
};
shadow-offset-y = "offset-y";
opacity = {
timing = "0.2s linear";
start = "window-raw-opacity-before";
end = "window-raw-opacity";
};
blur-opacity = "opacity";
shadow-opacity = "opacity";
},
{
triggers = ["workspace-in"];
offset-y = {
timing = "0.2s cubic-bezier(0.24, 0.64, 0.79, 0.98)";
start = "window-height + window-y";
end = "0";
};
shadow-offset-y = "offset-y";
opacity = {
timing = "0.2s linear";
start = "0";
end = "window-raw-opacity";
};
blur-opacity = "opacity";
shadow-opacity = "opacity";
},
{
triggers = ["workspace-in-inverse"];
offset-y = {
timing = "0.2s cubic-bezier(0.24, 0.64, 0.79, 0.98)";
start = "-window-height";
end = "0";
};
shadow-offset-y = "offset-y";
opacity = {
timing = "0.2s linear";
start = "0";
end = "window-raw-opacity";
};
blur-opacity = "opacity";
shadow-opacity = "opacity";
})